package com.xnfh.framework.bean

import android.os.Parcel
import android.os.Parcelable
import com.xnfh.framework.utils.NoArg
import java.io.Serializable

/**
 * @Description:返回体实体类
 * @author ziheng
 * @date 2022/12/19 13:46
 */

data class UserInforBean(
    val udu_id: String?,
    val rToken: String?,
    val udu_headicon: String?,
    val udu_nickname: String?,
    val udu_realname: String?,
    val udu_phone: String?,
    val areaStr: String?,
    val udu_address: String?,
    val udu_parentid: Int,
    val udu_parentName: String?,
    val roleName: String?,
    val isSuperService: String?,
    val provice_id: String?,
    val city_id: String?,
    val district_id: String?,
) : Parcelable {
    constructor(parcel: Parcel) : this(
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readInt(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString()
    ) {
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(udu_id)
        parcel.writeString(rToken)
        parcel.writeString(udu_headicon)
        parcel.writeString(udu_nickname)
        parcel.writeString(udu_realname)
        parcel.writeString(udu_phone)
        parcel.writeString(areaStr)
        parcel.writeString(udu_address)
        parcel.writeInt(udu_parentid)
        parcel.writeString(udu_parentName)
        parcel.writeString(roleName)
        parcel.writeString(isSuperService)
        parcel.writeString(provice_id)
        parcel.writeString(city_id)
        parcel.writeString(district_id)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<UserInforBean> {
        override fun createFromParcel(parcel: Parcel): UserInforBean {
            return UserInforBean(parcel)
        }

        override fun newArray(size: Int): Array<UserInforBean?> {
            return arrayOfNulls(size)
        }
    }
}

data class HomeAppVersion(
    val forcedUpdate: Int
)

data class HomeBannerBean(
    val stText: String,
    val pushTime: String,
    val stTypename: String,
    val stTitle: String,
    val createdat: Long,
    val tableImgList:List<TableImgBean>
)

data class HomeTongjiBean(
    val tidingCount: String,//预警
    val deviceWeatherCount: String,//物联在线
    val framTypeCount: String,//遥感
    val soilCount: Int//测土服务
)

data class WeatherDetailBean(
    val counname: String,
    val date: Long,
    val timezone: String,
    val realfeel: String,
    val maxTemp: String,
    val pop: String,
    val maskFromV2: Long,
    val iconnight: String,
    val backImg: String,
    val hour: String,
    val humidity: String,
    val id: Long,
    val temp: String,
    val windlevel: Long,
    val pname: String,
    val qpf: String,
    val uvi: String,
    val winddir: String,
    val cityid: String,
    val pressure: String,
    val iconday: String,
    val minTemp: String,
    val condition: String,
    val snow: String,
    val name: String,
    val windspeed: Double,
    val updatetime: Long,
    val stationid: String
)
data class TidingBean(
    val typeName: String,
    val typeImg: String,
    var read: Int,
    val id: Int,
    val cropIds: String
)

data class NewVersionHelpMessageBean(
    val list: List<NewVersionHelpMessageItem>,
    val total: Int
)
data class NewVersionHelpMessageItem(
    val stTitle: String,
    val createdat: Long,
    val stText: String,
    val tableImgList: List<TableImgBean>
)
data class TableImgBean(
    val compressPathUrl: String
)
data class FeedBackFieldBean(
    val udfName: String,
    val dautoid: String,
    val proviceId: String,
    val cityId: String,
    val districtId: String,
    val udcId: Int
)
data class PlanScheme(
    val total: Int,
    val list: List<PlanSchemeBean>
)
data class PlanSchemeBean(
    val udc_name: String,
    val plan_name: String,
    val content: String,
    val lastupdatedat: Long,
)
data class FieldDynamicsBean(
    val total: Int,
    val records: List<RecordsBean>
)
data class RecordsBean(
    val fieldName: String,
    val pname: String,
    val cname: String,
    val dname: String,
    val feedbackTime: String,
    val typeName: String,
    val feedbackContentText: String,
    val images: List<String>,
)
data class CropTypeBean(
    val typeName: String,
    val id: Int,
    var isSelect: Boolean
)

data class ProductIntroduce(
    val total: Int,
    val list: List<ProductIntroduceItem>
)

data class ProductIntroduceItem(
    val productTypeName: String,
    val productName: String,
    val productMatch: String,
    val productCrop: String,
    val productRemark: String,
    val tableImgList: List<TableImgListBean>
): Serializable
data class TableImgListBean(
    val pathUrl: String
): Serializable